package com.liu.eduservice.controller;

import com.liu.commonutils.ReturnResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/eduservice/user")
@CrossOrigin
@Api(description = "在线教育系统登录管理")
public class EduLoginController {

    // login
    @PostMapping("/login")
    public ReturnResult login(){
        return ReturnResult.ok().data("token","admin");
    }

    // info
    @GetMapping("/info")
    public ReturnResult info(){
        return ReturnResult.ok().data("name", "admin")
                .data("roles","[admin]")
                .data("avatar", "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
    }
}
